import type { RouteObject } from "react-router-dom";
import { Navigate } from 'react-router-dom'
import { lazy } from 'react'

const Home = lazy(() => import("@/views/Home"));
const NotFound = lazy(() => import("@/views/NotFound"));
const About = lazy(() => import("@/views/About"));

const routes: RouteObject[] = [
  {
    path: "/",
    element: <Navigate to="/home" />,
  },
  {
    path: "/home",
    element: <Home />,
  },
  {
    path: "/about",
    element: <About />,
  },
  {
    path: "*",
    element: <NotFound />,
  },
];

export default routes;